Method for setting dominant color using spatial coherency

ABSTRACT

The present invention discloses a method for setting a dominant color using a spatial coherency in order to improve performance of an image search function, describing an image region based on several dominant colors, a frequency of each dominant color, and a spatial coherency (SC) of the dominant color. In the method according to the present invention, the spatial coherency is non-uniformly quantized based on a predetermined threshold. According to one embodiment of the present invention, the spatial coherency (SC) is ranged from 0 to 1 and the threshold is set to 0.70.

BACKGROUND OF THE INVENTION

[0001] 1. Field of the Invention

[0002] The present invention relates to multimedia search. Particularly, the present invention relates to a method for setting a dominant color, where the dominant color is included as a feature for searching the multimedia data.

[0003] 2. Description of the Related Art

[0004] In a traditional image search system, it suggests a method for setting a dominant color of images that the images are divided into n×m number of grids, color histograms are obtained for each divided cell, and a representative color having maximum bin of color histogram is designated as the dominant color of a particular region. In other cases, an average value of color histogram or a major hue vector is selected as the dominant color of the particular region.

[0005] To be short, the dominant color can be determined by a method of using an average color value of a given region; choosing one most frequently appeared color; choosing the n most frequently appeared colors; using a color that prevails in a designated region by more than p%, or using a histogram, and so forth.

[0006] Each method described above has relative advantages and disadvantages in its own way.

[0007] For instance, the method using histogram makes it possible to finely represent the color. However, it requires a lot of data and sometimes set the dominant color for colors occupying extremely small part of the region.

[0008] Another method taking a single average value is advantageous that it has abridged data information and is capable of performing a pre-filtering function in a content-based search. Unfortunately however, if the region is composed of a variety of colors, it is pretty hard to accurately represent the dominant color.

[0009] However, considering that the characteristics of images are usually diverse and that in most cases it is difficult to express various colors by a single color value, the method of expressing an image region using only one dominant color is rather inappropriate or insufficient to represent the entire characteristics of the images and to construct a precise image characteristic database, so that it causes a deterioration of a performance of an image search using such a characteristic database.

[0010] Moreover, a method of expressing a dominant color of a region based on a variety of colors not only occupies a lot of storage space, but also makes it difficult to precisely represent mutual relations among the colors. In many cases, it is also hard to determine the dominant color based on a color distribution of a given image region, and the dominant color value obtained by this method lacks precision.

[0011] Taking all the aforementioned problems into consideration, inventors of the present inventions introduced a new method for describing color information of a given image region, in which the image region is represented by several dominant colors and their frequencies (ratio of the dominant colors in a given region, percentage %), a spatial coherency (it is called as a ‘reliability’) for the dominant colors is defined, and such a reliability is used for the image search together with the dominant colors to improve performance of the image search. This method is described in Korean Patent Application No. 1999-3181 (corresponding to U.S. patent application Ser. No. 09/479,888 filed on Jan. 10, 2000 and PCT Application No. PCT/KR99/00849 filed on Dec. 31, 1999) and Korean Patent Application No. 1999-26784 (corresponding to U.S. patent application Ser. No. 09/609,392 and PCT Application No. PCT/KR00/00710, both filed on Jul. 3, 2000.

[0012] Here, the spatial coherency can be a clue or information how much the dominant colors of the given image region are reliable, and it also indicates how densely the dominant colors are mixed together in the image region.

[0013] Therefore, when the spatial coherency is defined together with the dominant color, one can find out how reliable the dominant color thereof is at the time of the image search, and based on this, more improved search can be realized.

[0014] As a result, it is concluded that performance of the image search is greatly influenced by how precisely the spatial coherency represents the reliability of the dominant color.

[0015] Therefore, it is evident that a simple uniform quantization of the spatial coherency is not sufficient to reflect the diverse characteristics of the images. Thus, a more improved quantization scheme of the spatial coherency is required.

SUMMARY OF THE INVENTION

[0016] Accordingly, the present invention is directed to a method for setting a dominant color that substantially obviates one or more problems due to limitations and disadvantages of the related art.

[0017] An object of the present invention to provide a method for setting a dominant color using a spatial coherency of the dominant color to improve performance of a multimedia data search especially when the dominant color is used as a feature of the multimedia data.

[0018] To achieve the above object and other advantages and in accordance with the purpose of the invention, as embodied and broadly described herein, there is provided a method for setting a dominant color, in which the dominant color is expressed by a dominant color value, a frequency and a spatial coherency thereof, and the spatial coherency is non-uniformly quantized based on a predetermined threshold.

[0019] According to one aspect of the present invention, the spatial coherency is divided into designated sections based on a predetermined threshold in order to quantize the spatial coherency corresponding to each section into a specifically designated value, or to uniformly quantize the spatial coherency for the specific section, thereby making the entire spatial coherency be non-uniformly quantized.

[0020] According to a preferred embodiment of the present invention, there is provided a method for setting a dominant color to describe a given image region by using a dominant color that represent the given image region and a spatial coherency (SC) on the dominant color, comprising: comparing the spatial coherency with a predetermined threshold; and non-uniformly quantizing the spatial coherency by mapping a quantized spatial coherency (QSC) corresponding to the spatial coherency, based on the comparison between the spatial coherency and the predetermined threshold.

[0021] Preferably, the spatial coherency is normalized from real number 0 to 1 and the threshold is set to 0.70.

[0022] More preferably, if the spatial coherency is smaller than the threshold 0.70, a quantization value on the corresponding spatial coherency is mapped into ‘1’, and for a region having the spatial coherency between 0.70 and 1, an uniform quantization is applied as many as a number of remaining quantization.

[0023] Preferably, a value ‘0’ for the quantized spatial coherency (QSC) is used as a signal that the spatial coherency is not valid or computed.

[0024] According to another preferred embodiment of the present invention, there is provided a method for quantizing spatial coherencies of a dominant color of an image, comprising: normalizing the spatial coherencies from 0 to 1; assigning predetermined number of bits to the spatial coherencies by 5 bits (0 to 31); and non-uniformly quantizing the spatial coherencies to a range from 1 to 31, based upon the predetermined threshold of normalization.

[0025] Preferably, the quantized spatial coherencies (QSC) are set to 1 if the normalized values of spatial coherencies are less than the threshold of 0.70, while spatial coherency values ranged from 0.70 to 1 are uniformly quantized to the range from 2 to 31.

[0026] More preferably, the quantized spatial coherency of ‘0’ is used to signal that this element is not computed.

[0027] It is to be understood that both the foregoing general description and the following detailed description of the present invention are exemplary and explanatory and are intended to provide further explanation of the invention as claimed.

BRIEF DESCRIPTION OF THE DRAWINGS

[0028] The foregoing and other objects and features of the present invention will become more fully apparent from the following description and appended claims, taken in conjunction with the accompanying drawings. Understanding that these drawings depict only typical embodiments of the invention and are, therefore not to be considered limiting of its scope, the invention will be described with additional specificity and detail through use of the accompanying drawings in which:

[0029]FIG. 1 is a flow chart showing a quantization scheme of a spatial coherency in accordance with a first embodiment of the present invention for setting a dominant color;

[0030]FIG. 2 is a flow chart showing a quantization scheme of a spatial coherency in accordance with a second embodiment of the present invention for setting a dominant color; and

[0031]FIG. 3 is a flow chart showing a quantization scheme of a spatial coherency in accordance with a third embodiment of the present invention for setting a dominant color.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

[0032] The following detailed description of the embodiments of the present invention, as represented in FIGS. 1-3, is not intended to limit the scope of the invention, as claimed, but is merely representative of the presently preferred embodiments of the invention. In the description, same drawing reference numerals are used for the same elements even in different drawings. The matters defined in the description are nothing but the ones provided to assist in a comprehensive understanding of the invention. Thus, it is apparent that the present invention can be carried out without those defined matters. Also, well-known functions or constructions are not described in detail since they would obscure the invention in unnecessary detail.

[0033] The present invention suggests a method for setting a dominant color especially when a dominant color of a given image region and a spatial coherency (SC) of the dominant color are expressed together, in which the method includes steps of comparing the spatial coherency with a predetermined threshold, and non-uniformly quantizing the spatial coherency by mapping a quantized spatial coherency (QSC) corresponding to the spatial coherency based on the comparison result of the spatial coherency with the predetermined threshold.

[0034] Preferably, the spatial coherency is normalized from real number 0 to 1 and the threshold used in the method of the present invention is set to 0.70.

[0035] If the qnantized spatial coherency (QSC) is ‘0’, it means that the spatial coherency is not valid.

[0036] On the other hand, if the spatial coherency is smaller than the threshold, 0.70, the quantization value for the corresponding spatial coherency is mappinged into ‘1’ (QSC=1), while a uniform quantization is applied to the region having the spatial coherency from 0.70 to 1 as many as the number of the remaining quantization values. Here, the uniform quantization is performed based on the following formula:

Quantized Spatial Coherency (QSC)=(int)[(SC−0.7)/(1.0−0.7)×(2.0^(Sc) ^(_(—)) ^(BIT)−2.0)+0.5]+2,

[0037] wherein the SC_BIT denotes a number of bit assigned to the quantization.

[0038] In one embodiment of the present invention, the spatial coherency is quantized into 1 bit, and if the spatial coherency is smaller than the threshold, 0.70, the QSC becomes zerowhile, if the spatial coherency is greater than the threshold, 0.70, the QSC becomes 1.

[0039] Preferably, the threshold employed in the present invention may be set by two threshold values, i.e. a first threshold, 0.62, and a second threshold, 0.70.

[0040] In another embodiment of the present invention, the spatial coherency is quantized into 2 bits or more, and if the spatial coherency at this time is less than 0.62 (SC<0.62), the QSC becomes zero. On the other hand, if the spatial coherency is between 0.62 and 0.70 (0.62≦SC≦0.70), the QSC is 1, and if the spatial coherency is 0.70 and above (SC≧0.70), the uniform quantization is applied to the region having the threshold from 0.70 to 1 as many as the number of the remaining quantization values. Similar to the above, the uniform quantization is performed based on the following formula:

Quantized Spatial Coherency (QSC)=(int)[(SC−0.7)/(1.0−0.7)×(2.0^(SC) ^(_(—)) ^(BIT)−3.0)+0.5]+2,

[0041] wherein the SC_BIT denotes a bit number assigned to the quantization and it is two bits or more than two bits (SC_BIT≧2).

[0042] The method for setting a dominant color using a spatial coherency is now explained with reference to the relevant figures.

[0043] As described above, the primary goal of the method is to enhance performance of the image search by representing an image region based on several dominant colors, their frequencies (percentage of the dominant colors in a given region) and spatial coherencies corresponding to the dominant colors, and by exploiting the spatial coherencies with the dominant colors during a multimedia data search.

[0044] Typically used methods for setting the dominant color includes a method for using an average color value of a region, a method for representing the dominant color by the most frequently appearing color, a method for representing the dominant color by the n most frequently appeared colors (n is a predetermined number), a method for using a color occupying more than p% in a designated region, or a method using a histogram.

[0045] Preferably, the spatial coherency is expressed by a single value for whole dominant colors of a region or an image (SC: Spatial Coherency for whole dominant colors).

[0046] As mentioned before, the spatial coherency value of the present invention is non-uniformly quantized to improve performance of the image search.

[0047] Here, the spatial coherency, SC, is obtained based on the following formula:

[0048]SC=Σ _(for all i)(COH _(—) Ci×COUNT_(—) PELS _(—) Ci/TOTAL_(—) PELS_OF_(—) R)

[0049] wherein, COH_Ci is the per-dominant color coherency of Ci; COUNT_PELS_Ci is the number of pixels of Ci in the region R; and TOTAL_PELS_OF_R is the size of the region R calculated by counting pixels in the region R.

[0050] In order to obtain the spatial coherency, the spatial coherency value is first designated to an initial value ‘0’ (Set SC=0), and a variable for counting the pixel value (SUM_COUNG_PELS) is designated to ‘0’.

[0051] After that, VISITED PELp=FALSE is designated for all pixels in the given region R, and then COH_Ci and COUNT_PELS_Ci are obtained in consideration of the whole dominant colors (Ci).

[0052] To get final spatial coherency, SC is added by COH_Ci×COUNT_PELS_Ci (i.e., SC=SC+COH_Ci×COUNT.PELS_Ci), and is divided by TOTAL_PELS_OF_R (i.e., SC SC/TOTAL_PELS_OF_R).

[0053] Specifically, the COH_Ci (per-dominant color coherency of Ci) and the COUNT_PELS_Ci are obtained as follows.

[0054] To begin with, a size of a coherency checking mask (CCM) is determined. For example, the CCM is obtained by multiplying CCM_WIDTH (=3) and CCM_HEIGHT (=3). The initial COUNT_PELS_Ci is set zero (0), and TOTAL_NUM_COHERENT is also set zero (0). For the whole pixel PELj in the region R, if the relation, Ci==COLOR_OF_PELj & VISITED_PELj==FALSE is satisfied, the VISITED_PELj is TRUE (i.e., VISITED_PELj=TRUE), and the COUNT_PELS_Ci is increased by 1 (i.e., COUNT_PELS_Ci=COUNT_PELS_Ci+1). And, the PELj is adjusted to the center of the CCM for the following operations.

[0055] Except for the central pixel PELj, if Ci==COLOR_OF_MASKED_PIXELk for all the other masked pixels (MASKED_PIXELk), they are increased by TOTAL_NUM_COHERENT++.

[0056] Next, the COH_Ci is calculated using the formula, COH_Ci=TOTAL_NUM_COHERENT/COUNT_PELS_Ci/(CCM_WIDTH*CCM_HEIGHT−1). Then, using the obtained COH_Ci and the COUNT_PELS_Ci, the spatial coherency is obtained based on the formula, Σ_(for all i), (COH_Ci×COUNT_PELS_Ci/TOTAL_PELS_OF_R).

[0057] The spatial coherency determined by the above algorithm is normalized by a real number between 0 and 1. The final spatial coherency is then quantized into 1 bit, 2 bits, 3 bits, 4 bits or 5 bits.

[0058] For example, if the spatial coherency is quantized into 1 bit, the QSC (quantized spatial coherency) takes a value of 0 or 1; if the spatial coherency is quantized into 2 bits, the QSC (quantized spatial coherency) has a value out of 0, 1, 2 or 3; if the spatial coherency is quantized into 3 bits, the QSC (quantized spatial coherency) has a value out of 0, 1, 2, 3, 4, 5, 6, or 7; if the spatial coherency is quantized into 4 bits, the QSC (quantized spatial coherency) has a value out of 0, 1, 2, . . . , 14 or 15; and if the spatial coherency is quantized into 5 bits, the QSC (quantized spatial coherency) has a value out of 0, 1, 2, . . . , 30 or 31.

[0059] Therefore, the quantization scheme of the spatial coherency is largely categorized into a uniform quantization scheme in which the spatial coherency is uniformly divided from 0 to 1 for mapping each quantized value, and a non-uniform quantization scheme in which the section between 0 and 1 is non-uniformly divided for mapping each quantized value. Preferably, the non-uniform quantization scheme is applied to the present invention for improving the search function even when relatively small bit numbers are used.

[0060] More specifically, the non-uniform quantization scheme of the spatial coherency according to the present invention is divided into a case of using ‘0’ for the quantization value, and a case of excluding (not using) ‘0’ for the quantization value.

[0061] In some cases, ‘0’ is not used for the quantization value because ‘0’ is already used for implying another, namely, ‘SC is not valid’. For instance, when the spatial coherency is quantized into 2 bits, the QSC (quantized spatial coherency) is mappinged over 1, 2 or 3.

[0062]FIG. 1 illustrates a first embodiment of the present invention where ‘0’ is not used for the quantization value, and the threshold, 0.70, is used for the non-uniform quantization.

[0063] First of all, the spatial coherency is calculated (S101). Then, the spatial coherency is compared with the threshold, 0.70 (S102). If the spatial coherency is smaller than 0.70, the QSC is mappinged into 1 (S103), while if the spatial coherency is greater than the threshold, 0.70, a uniform quantization is proceeded to a region having the spatial coherency from 0.70 to 1 as many as the number of the remaining quantization (S104).

[0064] In other words, the QSC is uniformly quantized based on the following formula (S105):

(QSC)=(int)[(SC−0.7)/(1.0−0.7)×(2.0^(SC) ^(_(—)) ^(BIT)−2.0)+0.5]+2

[0065] wherein, SC_BIT is the number of bits assigned to the quantization. For example, the SC_BIT can be 2 bits, 3 bits, 4 bits or 5 bits.

[0066]FIG. 2 and FIG. 3 illustrate methods of quantizing the spatial coherency using the quantization value ‘0’ in accordance with the second embodiment and the third embodiment of the present invention.

[0067] If the spatial coherency is quantized using the quantization value 0, the quantized spatial coherency can be expressed in a way that the quantization value ‘0’ is included. For example, if the spatial coherency is quantized into 2 bits, the quantized spatial coherency (QSC) is mapped into 0, 1, 2 or 3.

[0068] Particularly, FIG. 2 illustrates the method of quantizing the spatial coherency using the quantization value ‘0’ and using 1 bit only.

[0069] Referring to FIG. 2, the spatial coherency is first calculated (S201), and is then compared with the threshold, 0.70 (S202).

[0070] As a result of the comparison, if the spatial coherency is smaller than 0.70 , the QSC is mapped into a quantization value of 0. Meanwhile, if the spatial coherency is greater than 0.70, the QSC is mapped into a quantization value of 1.

[0071] On the other hand, the third embodiment shown in the FIG. 3 shows the method of obtaining quantized spatial coherency (QSC), especially when the spatial coherency is quantized using greater than 1 bit, such as, 2 bits, 3 bits, 4 bits or 5 bits.

[0072] Again, the spatial coherency is first calculated (S301) like before, but is compared with the thresholds, 0.62 and 0.70 at this time (S302).

[0073] If the spatial coherency is smaller than 0.62, the QSC is mapped into the quantization value 0 (S303), and if the spatial coherency is greater or equal to 0.62 and is smaller than 0.70 (0.62≦SC<0.70), the QSC is mapped into the quantization value 1 (S304).

[0074] In the meantime, if the spatial coherency is greater or equal to 0.70, the non-uniform quantization is applied to the region having the spatial coherency from 0.70 to 1 as many as the number of the remaining quantization (S305).

[0075] In other words, the QSC is uniformly quantized based on the following formula (S305):

(QSC)=(int)[(SC−0.7)/(1.0−0.7)×(2.0^(SC) ^(_(—)) ^(BIT)−3.0)+0.5]+2

[0076] wherein, SC_BIT is the number of bits assigned to the quantization. For example, the SC_BIT can be 2 bits, 3 bits, 4 bits or 5 bits.

[0077] As explained before, when a certain image or an image region is represented by a dominant color, if the frequency of the dominant color and the spatial coherency of the dominant color are expressed together with the dominant color, and if the spatial coherency is non-uniformly quantized, it is possible to improve the performance of image search even if the relatively small bit numbers are employed.

[0078] For a better image search using information on a dominant color (the dominant color value, the frequency of the color, and the spatial coherency of the color), a certain image region (or the whole image) can be compared with another image region. That is, several dominant colors extracted from each image region, the frequencies of the dominant colors, and the spatial coherency values on the dominant colors are matched to one another for the comparison.

[0079] To do so, the difference, Diff (D1, D2), for reflecting the similarity between the two image regions (or the whole images) to be compared is calculated using the formula:

[0080]Diff(D 1, D 2)=W 1×SC _(—) Diff×DC _(—) Diff+W 2×DC _(—) Diff.

[0081] In this way, it is searched how similar the two image regions (or the whole images) are.

[0082] In the formula, the W1 denotes a weight on the SC_Diff. For example, the W1 can be designated to 0.3 (W1=0.3). However, if the spatial coherency is not valid, the W1 is designated to 0 (W1=0). Similarly, the W2 denotes a weight on the second item on the right hand side, DC_Diff. For instance, W2 can be designated to 0.7 (W2=0.7).

[0083] Here, the SC_Diff is an absolute value of the difference of each spatial coherency of two image regions (or the whole images) to be compared, and the DC_Diff is the difference between the dominant color values of two image regions (or the whole images) to be compared.

[0084] In conclusion, the present invention is advantageous for improving performance of the search, particularly during the image search, by expressing the dominant color for an image search together with the frequency and the spatial coherency thereof, in which the spatial coherency is non-uniformly quantized based on the predetermined threshold. Thus, even if the relatively small bit numbers are employed, the spatial coherency can represent how reliable the dominant color is and it provides more improved performance of image search.

[0085] While the invention has been described in conjunction with various embodiments, they are illustrative only. Accordingly, many alternative, modifications and variations will be apparent to persons skilled in the art in light of the foregoing detailed description. The foregoing description is intended to embrace all such alternatives and variations falling with the spirit and broad scope of the appended claims. 

What is claimed is:
 1. A method for setting a dominant color to describe a given image region by using a dominant color that represent the given image region and a spatial coherency (SC) on the dominant color, the method comprising: comparing the spatial coherency with a predetermined threshold; and non-uniformly quantizing the spatial coherency by mapping a quantized spatial coherency (QSC) corresponding to the spatial coherency, based on the comparison between the spatial coherency and the predetermined threshold.
 2. The method of claim 1, wherein the spatial coherency is normalized from 0 to 1 and the threshold is 0.70.
 3. The method of claim 1, wherein ‘0’ for the quantized spatial coherency (QSC) means that the spatial coherency is not valid.
 4. The method of claim 2, wherein if the spatial coherency is smaller than the threshold 0.70, a quantization value on the corresponding spatial coherency is mapped into ‘1’, and for a region having the spatial coherency between 0.70 and 1, an uniform quantization is applied as many as a number of remaining quantization.
 5. The method of claim 4, wherein the uniform quantization of the quantized spatial coherency (QSC) is performed based on the following formula: (QSC)=(int) [(SC−0.7)/(1.0−0.7)×(2.0^(SC) ^(_(—)) ^(BIT)−2.0)+0.5]+2 wherein, SC_BIT is a number of bits assigned to the quantization.
 6. The method of claim 2, wherein the spatial coherency is quantized by 1 bit, and wherein the QSC becomes zero (QSC=0) if the spatial coherency is smaller than the threshold 0.70, while the QSC becomes 1 (QSC=1) if the spatial coherency is greater than the threshold 0.70.
 7. The method of claim 1, wherein the threshold includes the first threshold of 0.62 and the second threshold of 0.70.
 8. The method of claim 7, wherein the spatial coherency is quantized by 2 bits or more, and wherein the QSC becomes zero (QSC=0) if the spatial coherency is smaller than the first threshold 0.62 (SC<0.62); the QSC becomes 1 (QSC=1) if the spatial coherency is greater than or equal to the first threshold 0.62 and smaller than the second threshold 0.70 (0.62≦SC<0.70); and an uniform quantization is applied to a region having the spatial coherency from 0.70 to 1 if the spatial coherency is greater than or equal to 0.7 (0.70≦SC).
 9. The method of claim 8, wherein the uniform quantization of the quantized spatial coherency (QSC) is performed based on the following formula: (QSC)=(int) [(SC−0.7)/(1.0−0.7)×(2.0^(SC) ^(_(—)) ^(BIT)−3.0)+0.5]+2 wherein SC_BIT is a number of bits assigned to the quantization.
 10. A method for quantizing spatial coherencies of a dominant color of an image, comprising: normalizing the spatial coherencies from 0 to 1; assigning predetermined number of bits to the spatial coherencies by 5 bits (0 to 31); and non-uniformly quantizing the spatial coherencies to a range from 1 to 31, based upon the predetermined threshold of normalization, wherein quantized spatial coherencies (QSC) are set to 1 if the normalized values of spatial coherencies are less than the threshold of 0.70, while spatial coherency values ranged from 0.70 to 1 are uniformly quantized to the range from 2 to
 31. 11. The method according to the claim 10, wherein the quantized spatial coherency of ‘0’is used to signal that this element is not computed.
 12. The method of claim 10, wherein the uniform quantization of the spatial coherency (QSC) is performed based on the following formula: (QSC)=(int) [(SC−0.7)/(1.0−0.7)×(2.0^(SC) ^(_(—)) ^(BIT)−2.0)+0.5]+2 wherein SC_BIT is a number of bits assigned to the quantization. 